<?php

namespace app\admin\controller\service;

use service\JsonService;
use app\common\model as M;

/**
 * 分类模块
 */
class Service extends \app\admin\controller\AuthController
{
	public $model = '\app\common\model\Service';

    use \traits\ShotcutControllerTrait;

    public function _save ($data)
    {
        if ( isset($data['label']) && is_array($data['label']) ) {
            $data['label'] = json_encode($data['label'] , JSON_UNESCAPED_UNICODE);
        }
        if ( isset($data['cover']) && is_array($data['cover']) ) {
            $data['cover'] = json_encode($data['cover'] , JSON_UNESCAPED_UNICODE);
        }

        return $data;
    }
}